package com.pdsu.graduation_design.listener;

import android.view.View;

import androidx.viewpager.widget.ViewPager;

import com.pdsu.graduation_design.R;

public class Bottom_Tap_OnClickListener implements View.OnClickListener {


    private ViewPager p_viewPager;

    public Bottom_Tap_OnClickListener(ViewPager viewPager) {
        p_viewPager=viewPager;
    }

    @Override
    public void onClick(View v) {

        System.out.println(v.getId()+"*****");
        switch (v.getId()){
            case  R.id.pre_btn:

                p_viewPager.setCurrentItem(0);
                break;
            case R.id.news_btn:
                p_viewPager.setCurrentItem(1);
                break;
            case R.id.main_btn:
                p_viewPager.setCurrentItem(2);
                break;
            case R.id.pay_btn:
                p_viewPager.setCurrentItem(3);
                break;
            case R.id.my_btn:
                p_viewPager.setCurrentItem(4);
                break;
        }



    }


}
